package com.freightoa.sgl_login.net

import com.freightoa.foundation.net.ApiResult
import com.freightoa.foundation.net.bean.SGLResponse
import com.freightoa.sgl_login.data.datasource.database.model.Data
import com.freightoa.sgl_login.data.datasource.database.model.UserType
import retrofit2.http.HEAD
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface LoginServer {
    /**
     * 登录接口的封装
     */
    @POST("/MiddlewareAPI/v{version}/StarcoAir/GetTokenByUser")
    suspend fun getLogin(
        @Path("version") version: String,
        @Query("login_name") loginName: String,
        @Query("password") password: String,

        ): ApiResult<SGLResponse<Data>>


    @POST("/MiddlewareAPI/v{version}/StarcoAir/GetUserType")
    suspend fun getUserType(
        @Path("version") version: String,
    ): ApiResult<SGLResponse<UserType>>
}